import {defineStore} from "pinia";
import {ref} from "vue";
import {getBlogSettingsDetail} from "@/api/frontend/blogsettings.js";

export const useBlogSettingsStore = defineStore('blogsettings',()=>{
    //博客設置信息
    const blogSettings = ref({})

    function getBlogSettings(){
        getBlogSettingsDetail().then(res=>{
            if(res.success ){
                blogSettings.value = res.data
            }
        })
    }

    return { blogSettings,getBlogSettings }
})
